package com.itheima.service;
import com.itheima.entity.EditPassword;
import com.itheima.entity.PageResult;
import com.itheima.entity.QueryPageBean;
import com.itheima.pojo.Role;
import com.itheima.pojo.User;

import java.util.List;

public interface UserService {
    public User findByUsername(String username);

    //增加用户
    public void add(User user,Integer[] roleIds);
    //删除用户
    public void deleteById(Integer id);
    //修改用户
    public void edit(User user,Integer[] roleIds);
    //分页查询
    public PageResult findPage(QueryPageBean queryPageBean);
    //回显用户管理
    public User findById(Integer id);
    //通过用户id通过角色名
    /*List<Role> findRoleNameByUserId(Integer userId);*/

    List<Role> findAll();

    //添加数据
    public void addData(List<User> data);

    List<Integer> findRoleIdsNameByUserId(Integer userId);

    //根据用户名查询所有信息
    public User findAllByUsername(String username);

    public void editUser(User user);

    boolean confirm(EditPassword password);

    void editPassword(EditPassword password);
}
